home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 April / macformat-023.iso / Shareware City / Developers / NeoPersist 3.0.8 folder / NeoIncludes / Macintosh / PowerPlant / CNeoDatabasePP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-04  |  1.9 KB  |  53 lines  |  [TEXT/KAHL]

  1.  /************************************************************
  2.  *
  3.  *    Created: Friday, March 8, 1991 11:24:46 AM
  4.  *    CNeoDatabasePP.h
  5.  *    C++ class implementation for PowerPlant -based file class
  6.  *
  7.  *
  8.  *    Copyright © Neologic Systems 1992-1993. All Rights Reserved.
  9.  *    All rights reserved
  10.  *
  11.  *
  12.  * The CNeoDatabasePP class is, in effect, an area manager. The area it manages is a
  13.  * string of bytes that can be added to at the end. Access to the area however
  14.  * is slower than accessing main memory. Information in the area can only be
  15.  * accessed by allocating space in main memory. This main memory space needs
  16.  * to be used as a cache of the database's contents.
  17.  *
  18.  ***********************************************************/
  19. #pragma once            /* Include this file only once */
  20.  
  21. #include "NeoTypes.h"
  22. #include CNeoDatabaseH
  23. #include <StandardFile.h>
  24.  
  25. class CNeoDatabasePP : public CNeoDatabase
  26. {
  27. public:
  28.                         /** Instance Methods **/
  29.                         CNeoDatabasePP(OSType aCreator, OSType aType);
  30.     virtual                ~CNeoDatabasePP(void);
  31.  
  32.                         /** Purging Methods **/
  33.     static Boolean        PurgeCache(long aNeeded);
  34.  
  35.                         /** Macintosh-Specfic Methods **/
  36.     virtual OSType        getCreator(void) const;
  37.     virtual OSType        getType(void) const;
  38.     virtual void        setCreator(const OSType aCreator);
  39.     virtual void        setType(const OSType aType);
  40.  
  41.                         /** PowerPlant-specific Methods **/
  42.     virtual void        CloseDataFork(void);
  43.     virtual void        CreateNewFile(OSType aCreator, OSType aType, ScriptCode aScriptCode = smSystemScript);
  44.     virtual void        CreateNewDataFile(OSType aCreator, OSType aType, ScriptCode aScriptCode = smSystemScript);
  45.     Int16                GetDataForkRefNum(void);
  46.     virtual Int16        OpenDataFork(Int16 inPrivileges);
  47.     void                SFSpecify(SFReply *macSFReply);
  48.     void                Specify(const FSSpec *aFileSpec);
  49.  
  50. protected:
  51.     OSType                fType;                // file system type of the database
  52.     OSType                fCreator;            // file system creator of this database
  53. };